package com.godyao.enums;

/**
 * @author godyao
 * @date 2022/3/19
 */
public enum ResponseCodeEnum {

    OK(200, "成功"),
    WAITING(201, "秒杀中"),
    FAIL(500, "失败"),
    NO_STOCK(501, "库存不足"),
    SEC_KILL_LIMIT(502, "超出购买限制"),
    NO_AHTU(403, "认证失败"),
    TO_MUCH(400, "请求太过频繁");

    private final int code;

    private final String desc;

    ResponseCodeEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public String getDesc() {
        return desc;
    }

    public int getCode() {
        return code;
    }
}
